import request, { headers } from '@/utils/request'
import qs from 'qs'

export default {
  executeLogManager: {
    listPage(pageParam){return request.get('/goals/logs/list/page',{params: {...pageParam}})},
    readLog(logPath){return request.get('/goals/logs/readLog',{params: {logPath}})},
    downloadLog(logPath){return request.get('/goals/logs/download',{params: {logPath}})}
  },
  localMavenManager: {
    upload(formData){return request.post('/maven/local/upload', formData)},
    downloadNetMaven(downloadUrl){return request.get(`/maven/local/downloadNetMaven?downloadUrl=${downloadUrl}`)},
    setDefault(filename){return request.post('/maven/local/setDefault',{filename},headers.urlencoded)},
    versions(){return request.get('/maven/local/versions')},
    current(){return request.get('/maven/local/current')},
    deleteVersion(filename){return request.post('/maven/local/delete',{filename},headers.urlencoded)}
  },
  resolveJars(formData){return request.post('/maven/resolveJars',formData)}
}
